package com.atguigu.factory.simplefactory.pizzastore.order;

import com.atguigu.factory.simplefactory.pizzastore.pizza.CheesePizza;
import com.atguigu.factory.simplefactory.pizzastore.pizza.GreekPizaa;
import com.atguigu.factory.simplefactory.pizzastore.pizza.Pizza;

public class SimpleFactory {

    static Pizza createPizza(String name) {
        Pizza pizza = null;
        if ("cheese".equals(name)) {
            pizza = new CheesePizza();
        } else if ("greek".equals(name)) {
            pizza = new GreekPizaa();
        }
        return pizza;
    }
}
